import axios from 'axios'

// 查询客服问答模板列表
export function listAskAnswerTemplate(query) {
  return axios.request({
    url: '/robotChat/list',
    method: 'get',
    params: query
  })
}

// 查询客服问答模板详细
export function getAskAnswerTemplate(id) {
  return axios.request({
    url: '/robotChat/' + id,
    method: 'get'
  })
}

// 新增客服问答模板
export function addAskAnswerTemplate(data) {
  return axios.request({
    url: '/robotChat/add',
    method: 'post',
    data: data
  })
}

// 修改客服问答模板
export function updateAskAnswerTemplate(data) {
  return axios.request({
    url: '/robotChat/modify',
    method: 'put',
    data: data
  })
}

// 删除客服问答模板
export function delAskAnswerTemplate(id) {
  return axios.request({
    url: '/robotChat/delete/'+id,
    method: 'delete'
  })
}

// 导出客服问答模板
export function exportAskAnswerTemplate(query) {
  return axios.request({
    url: '/robotChat/export',
    method: 'get',
    params: query
  })
}

//下载数据
export function importAskAnswerTemplate() {
  return axios.request({
    url: '/robotChat/downloadTemplate',
    method: 'get'
  })
}


//导入Excle数据
export function importExcelAskAnswerData() {
  return axios.request(
    {
      url: '/robotChat/importData',
      method: 'post'
    }
  )
}
